<html>
<head><meta charset="utf-8"><title>nonminimal-bool · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/nonminimal-bool.html">nonminimal-bool</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214739632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/nonminimal-bool/near/214739632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ThibsG <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/nonminimal-bool.html#214739632">(Oct 27 2020 at 18:02)</a>:</h4>
<p>Hello! I work on fixing <a href="https://github.com/rust-lang/rust-clippy/issues/5265">https://github.com/rust-lang/rust-clippy/issues/5265</a>.<br>
I cannot reproduce it on playground (<a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=8158d113aecdf03edda864b02606f1d7">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=8158d113aecdf03edda864b02606f1d7</a>), even with my 'own' macro.<br>
Is that somehow related to <a href="https://github.com/rust-lang/rust-clippy/commit/6afa4ef60f973218c901d0f802d586fe6c43017d#diff-61a0d4f1ae2f16a8ecac51908b8d980b7c2eda0d286dd2cc5a0968d008dac795">https://github.com/rust-lang/rust-clippy/commit/6afa4ef60f973218c901d0f802d586fe6c43017d#diff-61a0d4f1ae2f16a8ecac51908b8d980b7c2eda0d286dd2cc5a0968d008dac795</a>, where side effects are now denied (<a href="https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/utils/hir_utils.rs#L353">https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/utils/hir_utils.rs#L353</a>), so it could have fixed it? (I don't know what was the body of the removed <code>ignore_fn()</code> method though)</p>



<a name="214785802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/nonminimal-bool/near/214785802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/nonminimal-bool.html#214785802">(Oct 28 2020 at 01:17)</a>:</h4>
<p>I think it does not lint because it's bailing out if code is from a macro, <a href="https://github.com/rust-lang/rust-clippy/blob/de83f09be8694b241bf3d924c0d1e70ca71c38da/clippy_lints/src/booleans.rs#L449-L451">here</a>.</p>
<p>I'm not sure why it was linting back when the issue was opened since that check seems to be there since the beginning...</p>



<a name="214806069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/nonminimal-bool/near/214806069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ThibsG <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/nonminimal-bool.html#214806069">(Oct 28 2020 at 08:20)</a>:</h4>
<p>Yeah I saw that but as you said, it is here since beginning.</p>



<a name="214806596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/nonminimal-bool/near/214806596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eduardo Broto <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/nonminimal-bool.html#214806596">(Oct 28 2020 at 08:27)</a>:</h4>
<p>I think at some point there were changes to the <code>in_macro</code> function, but who knows.</p>
<p>In any case, I think it's safe to close the issue at this point as we can't reproduce it. What do you say?</p>



<a name="214806633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/nonminimal-bool/near/214806633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ThibsG <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/nonminimal-bool.html#214806633">(Oct 28 2020 at 08:27)</a>:</h4>
<p>If I comment this <code>in_macro</code> condition:</p>
<ul>
<li>it still doesn't lint for <code>assert_eq</code></li>
<li>it does lint for <code>my_assert_eq</code> define in the test file</li>
<li>it does lint for <code>my_assert_eq</code> but without location with <code>my_assert_eq</code> define in <code>auxiliary/macro_rules.rs</code></li>
</ul>



<a name="214806694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/nonminimal-bool/near/214806694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ThibsG <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/nonminimal-bool.html#214806694">(Oct 28 2020 at 08:28)</a>:</h4>
<p>I agree, we can close this</p>



<a name="214806764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/nonminimal-bool/near/214806764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ThibsG <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/nonminimal-bool.html#214806764">(Oct 28 2020 at 08:29)</a>:</h4>
<p>plus, when linting with location, the location is fine</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>